@include('../top')
<!--banner-->
<div class="banner-top">
	<div class="container">
		<h1>{{$good->goods_name}}</h1>
		<em></em>
		<h2><a href="{{url('/')}}">Home</a><label>/</label>{{$good->cat_name}}</h2>
	</div>
</div>
<div class="single">

<div class="container">
<div class="col-md-9">
	<div class="col-md-5 grid">		
		<div class="flexslider">
			  <ul class="slides">
                  <li data-thumb="{{$good->goods_img}}">
			        <div class="thumb-image"> <img src="{{$good->thumb_img}}" data-imagezoom="true" class="img-responsive"> </div>
			    </li>
			    <li data-thumb="{{$good->goods_img}}">
			         <div class="thumb-image"> <img src="{{$good->thumb_img}}" data-imagezoom="true" class="img-responsive"> </div>
			    </li>
			    <li data-thumb="{{$good->goods_img}}">
			       <div class="thumb-image"> <img src="{{$good->thumb_img}}" data-imagezoom="true" class="img-responsive"> </div>
			    </li> 
			  </ul>
		</div>
	</div>	
<div class="col-md-7 single-top-in">
						<div class="span_2_of_a1 simpleCart_shelfItem">
				<h3>{{$good->goods_name}}</h3>
                <input type="hidden" name="id" id="gid" value="{{$good->gid}}">
				<p class="in-para"> There are many variations of passages of Lorem Ipsum.</p>
			    <div class="price_single">
				  <span class="reducedfrom item_price">{{$good->shop_price}}</span>
				 <a href="#">点我下单</a>
				 <div class="clearfix"></div>
				</div>
				<h4 class="quick">简介:</h4>
				<p class="quick_desc">{{$good->goods_brief}}</p>
			    <div class="wish-list">
				 	<ul>
				 		<li class="wish"><a href="#"><span class="glyphicon glyphicon-check" aria-hidden="true"></span>添加到意愿清单</a></li>
				 	    <li class="compare"><a href="#"><span class="glyphicon glyphicon-resize-horizontal" aria-hidden="true"></span>添加对比</a></li>
				 	</ul>
				 </div>
				 <div class="quantity"> 
								<div class="quantity-select">                           
									<div class="entry value-minus">&nbsp;</div>
									<div class="entry value"><span>1</span></div>
									<div class="entry value-plus active">&nbsp;</div>
								</div>
							</div>
							<!--quantity-->
	<script>
    $('.value-plus').on('click', function(){
    	var divUpd = $(this).parent().find('.value'), newVal = parseInt(divUpd.text(), 10)+1;
    	divUpd.text(newVal);
    });

    $('.value-minus').on('click', function(){
    	var divUpd = $(this).parent().find('.value'), newVal = parseInt(divUpd.text(), 10)-1;
    	if(newVal>=1) divUpd.text(newVal);
    });
	</script>
	<!--quantity-->
				 
			    <a href="#" id="sub" class="add-to item_add hvr-skew-backward">添加到购物车</a>
			<div class="clearfix"> </div>
			</div>
		
					</div>
			<div class="clearfix"> </div>
			<!---->
			<div class="tab-head">
			 <nav class="nav-sidebar">
		<ul class="nav tabs">
          <li class="active"><a href="#tab1" data-toggle="tab">商品详情</a></li>
          <li class=""><a href="#tab2" data-toggle="tab">附加信息</a></li>
          <li class=""><a href="#tab3" data-toggle="tab">评论</a></li>
		</ul>
	</nav>
	<div class="tab-content one">
<div class="tab-pane active text-style" id="tab1">
 <div class="facts">
									  <p><?php echo $good->goods_desc; ?></p>
</div>
</div>
<div class="tab-pane text-style" id="tab2">
	
									<div class="facts">									
										<p > Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections </p>
										<ul >
											<li><span class="glyphicon glyphicon-ok" aria-hidden="true"></span>Multimedia Systems</li>
											<li><span class="glyphicon glyphicon-ok" aria-hidden="true"></span>Digital media adapters</li>
											<li><span class="glyphicon glyphicon-ok" aria-hidden="true"></span>Set top boxes for HDTV and IPTV Player  </li>
										</ul>
							        </div>	

</div>
<div class="tab-pane text-style" id="tab3">

									 <div class="facts">
									 @foreach($comm as $c)
										<ul>
											<li><span class="glyphicon glyphicon-ok" aria-hidden="false"></span>{{$c->user_name}}</li>
											<li><span class="" aria-hidden="true"></span>{{$c->content}}</li>
											<li><span class="" aria-hidden="true"></span>{{date('Y/m/d H:i',$c->pubtime)}}</li>
										</ul>
									@endforeach     
							     </div>	

 </div>
  
  </div>
  <div class="clearfix"></div>
  </div>
			<!---->	
</div>
<!----->

<div class="col-md-3 product-bottom product-at">
			<!--categories-->
    @foreach($cats as $scat)
        @if($scat->parent_id == 0)
            <div class=" rsidebar span_1_of_left">
                <h4 class="cate">{{$scat->cat_name}}</h4>
                @foreach($cats as $fcat)
                    @if($fcat->parent_id == $scat->cat_id)
                        <ul class="menu-drop">
                            <li class="item1"><a href="{{url('/',['home','cat',$fcat->cat_id])}}">{{$fcat->cat_name}}</a>
                                @foreach($cats as $icat)
                                    @if($icat->parent_id == $fcat->cat_id)
                                        <ul class="cute">
                                            <li class="subitem1"><a href="{{url('/',['home','cat',$fcat->cat_id])}}">{{$icat->cat_name}} </a></li>
                                        </ul>
                                    @endif
                                @endforeach
                            </li>
                        </ul>
                    @endif
                @endforeach
            </div>
            @endif
            @endforeach
				<!--initiate accordion-->
						<script type="text/javascript">
							$(function() {
							    var menu_ul = $('.menu-drop > li > ul'),
							           menu_a  = $('.menu-drop > li > a');
							    menu_ul.hide();
							    menu_a.click(function(e) {
							        e.preventDefault();
							        if(!$(this).hasClass('active')) {
							            menu_a.removeClass('active');
							            menu_ul.filter(':visible').slideUp('normal');
							            $(this).addClass('active').next().stop(true,true).slideDown('normal');
							        } else {
							            $(this).removeClass('active');
							            $(this).next().stop(true,true).slideUp('normal');
							        }
							    });
							
							});
						</script>
<!--//menu-->
 <section  class="sky-form">
					<h4 class="cate">Discounts</h4>
					 <div class="row row1 scroll-pane">
						 <div class="col col-4">
								<label class="checkbox"><input type="checkbox" name="checkbox" checked=""><i></i>Upto - 10% (20)</label>
						 </div>
						 <div class="col col-4">
								<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>40% - 50% (5)</label>
								<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>30% - 20% (7)</label>
								<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>10% - 5% (2)</label>
								<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>Other(50)</label>
						 </div>
					 </div>
				 </section> 				 				 
				 
					
					 <!---->
					 <section  class="sky-form">
						<h4 class="cate">Type</h4>
							<div class="row row1 scroll-pane">
								<div class="col col-4">
									<label class="checkbox"><input type="checkbox" name="checkbox" checked=""><i></i>Sofa Cum Beds (30)</label>
								</div>
								<div class="col col-4">
									<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>Bags  (30)</label>
									<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>Caps & Hats (30)</label>
									<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>Jackets & Coats   (30)</label>
									<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>Jeans  (30)</label>
									<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>Shirts   (30)</label>
									<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>Sunglasses  (30)</label>
									<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>Swimwear  (30)</label>
								</div>
							</div>
				   </section>
				   		<section  class="sky-form">
						<h4 class="cate">Brand</h4>
							<div class="row row1 scroll-pane">
								<div class="col col-4">
									<label class="checkbox"><input type="checkbox" name="checkbox" checked=""><i></i>Roadstar</label>
								</div>
								<div class="col col-4">
									<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>Levis</label>
									<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>Persol</label>
									<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>Nike</label>
									<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>Edwin</label>
									<label class="checkbox"><input type="checkbox" name="checkbox" ><i></i>New Balance</label>
									<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>Paul Smith</label>
									<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>Ray-Ban</label>
								</div>
							</div>
				   </section>		
		</div>
		<div class="clearfix"> </div>
	</div>
	</div>
			<!--brand-->
		<div class="container">
			<div class="brand">
				<div class="col-md-3 brand-grid">
					<img src="/images/ic.png" class="img-responsive" alt="">
				</div>
				<div class="col-md-3 brand-grid">
					<img src="/images/ic1.png" class="img-responsive" alt="">
				</div>
				<div class="col-md-3 brand-grid">
					<img src="/images/ic2.png" class="img-responsive" alt="">
				</div>
				<div class="col-md-3 brand-grid">
					<img src="/images/ic3.png" class="img-responsive" alt="">
				</div>
				<div class="clearfix"></div>
			</div>
			</div>
			<!--//brand-->
			</div>

		</div>
	<!--//content-->
		<!--//footer-->
@include('../bottom')
		<!--//footer-->
<script src="/js/imagezoom.js"></script>

	<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script defer src="/js/jquery.flexslider.js"></script>
<link rel="stylesheet" href="/css/flexslider.css" type="text/css" media="screen" />

<script>
// Can also be used with $(document).ready()
$(window).load(function() {
  $('.flexslider').flexslider({
    animation: "slide",
    controlNav: "thumbnails"
  });


    $('#sub').click(function(){
        var gid = $('#gid').val();
        var num = parseInt($('.value-plus').parent().find('.value').text());
        var url = "{{url('/',['home','cartadd'])}}"+'/'+gid+'/'+num;
        $.get(
                url,
                function(data){
                    if(data == 1){
                        alert('加入购物车成功');
                    }else if(data == 0){
                        alert('加入购物车失败');
<<<<<<< HEAD
                    }else if(data == 2){
                        alert('请先登录');
                        window.location.href = 'http://ooo.com/home/login';
=======
                    }else{
                        location='http://shop.com/home/login';
>>>>>>> 3937204e34ce650b2b3ea0a8e711cad8760c7d1a
                    }
                }
        );
        return false;
    });
});


</script>

	<script src="/js/simpleCart.min.js"> </script>
<!-- slide -->
<script src="/js/bootstrap.min.js"></script>


</body>
</html>